/// <summary>
/// Changes the connection information for an entry in the phone book or creates a new phone-book entry.
/// </summary>
/// <param name="lpszPhonebook">Pointer to a null-terminated string that specifies the full path and file name of a phone-book (PBK) file.
/// If this parameter is NULL, the function uses the current default phone-book file.</param>
/// <param name="lpszEntry">Pointer to a null-terminated string that specifies an entry name.
/// If the entry name matches an existing entry, RasSetEntryProperties modifies the properties of that entry.
/// If the entry name does not match an existing entry, RasSetEntryProperties creates a new phone-book entry.</param>
/// <param name="lpRasEntry">Pointer to the RASENTRY structure that specifies the connection data to associate with the phone-book entry.</param>
/// <param name="dwEntryInfoSize">Specifies the size, in bytes, of the buffer identified by the lpRasEntry parameter.</param>
/// <param name="lpbDeviceInfo">This parameter is unused. The calling function should set this parameter to NULL.</param>
/// <param name="dwDeviceInfoSize">This parameter is unused. The calling function should set this parameter to zero.</param>
/// <returns></returns>
[DllImport("rasapi32.dll", SetLastError = true, CharSet = CharSet.Auto)]
private static extern Uint RasSetEntryProperties(
string lpszPhonebook,
string lpszEntry,
ref RASENTRY lpRasEntry,
int dwEntryInfoSize,
IntPtr lpbDeviceInfo,
int dwDeviceInfoSize);
Declare Function RasSetEntryProperties Lib "rasapi32.dll" (TODO) As TODO
None.
Do you know one? Please contribute it!
None.
Please add some!
/// <summary>
/// Create or modify network connection.
/// </summary>
/// <param name="connectionName">Name of the network connection to create or modify.</param>
/// <param name="rasEntryStructure">RASENTRY structure containing connection settings.</param>
/// <returns>Enumerated RASERROR</returns>
public static RasError SetEntryProperties(string connectionName, RASENTRY rasEntryStructure)
{
return (RasError)RasSetEntryProperties(null, connectionName, ref rasEntryStructure, Marshal.SizeOf(rasEntryStructure), IntPtr.Zero, 0);
}